package chapter3;

public class Util {
    public static int[] generateRandomNumber(int n, int rangeL, int rangeR) {
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) Math.random() * (rangeR - rangeL + 1) + rangeL;
        }
        return arr;
    }

    public static int[] generateOrderedNumber(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = i;
        }
        return arr;
    }
}